package numbles.model;

public class Move {

	private Numble numble;
	private Coordinates oldCoordinates;
	private Coordinates newCoordinates;

	public Move(Numble numble, Coordinates oldCoordinates,
			Coordinates newCoordinates) {
		super();
		this.numble = numble;
		this.oldCoordinates = oldCoordinates;
		this.newCoordinates = newCoordinates;
	}
	public Numble getNumble() {
		return numble;
	}
	public void setNumble(Numble numble) {
		this.numble = numble;
	}
	public Coordinates getOldCoordinates() {
		return oldCoordinates;
	}
	public void setOldCoordinates(Coordinates oldCoordinates) {
		this.oldCoordinates = oldCoordinates;
	}
	public Coordinates getNewCoordinates() {
		return newCoordinates;
	}
	public void setNewCoordinates(Coordinates newCoordinates) {
		this.newCoordinates = newCoordinates;
	}
	public int getFallSize() {
		return oldCoordinates.getY() - newCoordinates.getY();
	}

	@Override
	public String toString() {
		return "numble " + numble.getNumber() + " from " + (oldCoordinates != null ? oldCoordinates.toString() : "nowhere") + " to " + newCoordinates.toString();
	}

}
